package com.flyme.module.base.client.api;


import com.flyme.common.core.model.ResultBody;
import com.flyme.module.base.client.entity.SysDict;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author zyf
 */
public interface SysDictRemoteService{

    /**
     * 获取全部字典项
     */
    @PostMapping(value="/selectAll")
    public ResultBody<List<SysDict>> selectAll();

    /**
     * 添加字典项
     */
    @PostMapping(value="/add")
    public ResultBody<Object> add(@ModelAttribute SysDict dict);

    /**
     * 编辑字典项
     */
    @PostMapping(value="/edit")
    public ResultBody<Object> edit(@ModelAttribute SysDict dict);

    /**
     * 删除字典项
     */
    @DeleteMapping(value="/delByIds/{id}")
    ResultBody<Object> delAllByIds(@PathVariable Long id);

    /**
     * 查询字典项
     */
    @GetMapping(value="/search")
    public ResultBody<List<SysDict>> search(@RequestParam String key);

}
